header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    gap: 20px; /* Espacio entre logo y la barra larga */
}

.search-filter {
    display: flex;
    align-items: center;
    background: #ffffff;
    padding: 4px 250px;
    border-radius: 50px;
    border: 0.1px solid #00a023;
    
    /* ESTO HACE QUE OCUPE TODO EL LARGO */
    flex: 1; 
    width: 100%;
    gap: 15px;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* El buscador ocupa la mayor parte del espacio */
.search-main {
    flex: 2;
    border-right: 1px solid #00a023;
}

/* Las categorías ocupan un espacio proporcional */
.filters-box {
    flex: 1.5;
    border-right: 1px solid #00a023;
    padding-right: 10px;
}

/* El carrito se mantiene al final de la barra larga */
.cart-container {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    min-width: 50px;
    justify-content: center;
    
    /* ESTO ES LO MÁS IMPORTANTE */
    position: relative; 
}

#search, #category, #subcategory {
    border: none;
    background: transparent;
    outline: none;
    width:100%;
    font-size: 0.9rem;
}
#cart-count {
    background: #0099ff; /* Azul Power Xtreme */
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    
    /* Centrado interno */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Forma circular */
    width: 18px;
    height: 18px;
    border-radius: 50%;
    
    /* POSICIONAMIENTO */
    position: absolute;
    top: -8px;    /* Súbelo un poco del icono */
    right: 5px;   /* Muévelo hacia la izquierda para que no toque el borde verde */
    
    /* Diseño */
    border: 1.5px solid #ffffff;
    box-sizing: content-box;
    z-index: 10;
}
/* Definición del movimiento de vibración */
@keyframes vibrate {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-10deg); }
    100% { transform: rotate(0deg); }
}

/* Esta clase hará que el icono vibre cuando se agregue al HTML */
.vibrate-active {
    display: inline-block;
    animation: vibrate 0.3s linear infinite;
}
